﻿using System;
using System.Data;
using System.Drawing;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Baimasoft.Manage.SqlServerDAL;

public partial class SysManage_OrgPersTree_View : System.Web.UI.Page
{
    DeptPersManage MyDPM = new DeptPersManage();

    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void HistoryInfo_Click(object sender, EventArgs e)
    {
        DivHistoryDesc.Style.Add("display", "");
        GridView1.DataSource = MyDPM .GetOrgPersHistoryInfo (hPersID.Value.ToString().Trim());
        GridView1.DataBind();
    }
    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        GridView1.PageIndex = e.NewPageIndex;
        GridView1.DataSource = MyDPM .DisplayPersHistoryInfo (hPersID.Value.ToString().Trim());
        GridView1.DataBind();
    }
    protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
    {

    }
    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowIndex != -1)
        {
            if (e.Row.RowIndex % 2 != 0)
            {
                e.Row.Attributes.Add("onclick", "'" + e.Row.Cells[0].Text.ToString().Trim() + "',tog(this,'AliceBlue')");
            }
            else
            {
                e.Row.Attributes.Add("onclick", "'" + e.Row.Cells[0].Text + "',tog(this,'#ffffff')");
            }
            if (e.Row.Cells[0].Text == "0")
                e.Row.ForeColor = Color.Red;
        }
    }
}
